<template>
  <p class="p">话题</p>
  <div class="chat" v-for="item in data.chatlist" :key="item">
    <span class="chat1">#</span>
    <span class="chat2">{{ item.chat2 }}</span>
    <span class="chat3">{{ item.chat3 }}</span>
  </div>
  <p class="p">帖子</p>
  <div class="discus" v-for="item in data.postlist" :key="item">
    <div class="tabtop">
      <p class="tabtop1">{{ item.tabtop1 }}</p>
      <p class="tabtop2">{{ item.tabtop2 }}</p>
    </div>
    <div class="tabbot">
      <div class="tabbotl">
        <img :src="item.headimg" alt="" />
        <span>{{ item.user }}</span>
      </div>
      <div class="tabbotr">
        <button>
          <van-icon class="icon" name="good-job-o" />
          <span>155</span>
        </button>
        <button>
          <van-icon class="icon" name="smile-comment-o" />
          <span>155</span>
        </button>
      </div>
    </div>
  </div>
</template>

<script>
import { reactive } from "vue";
export default {
  setup() {
    const data = reactive({
      chatlist: [
        {
          chat2: "适合油皮的眼霜推荐",
          chat3: "39.1k条讨论",
        },
        {
          chat2: "大油田也别作死，过度清洁会烂脸",
          chat3: "1671条讨论",
        },
        {
          chat2: "白天脸上爱出油，吸油纸还是保湿喷雾",
          chat3: "1877条讨论",
        },
      ],
      postlist: [
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
        {
          tabtop1: "视黄醇",
          tabtop2: "#孕妇禁用的护肤品和化妆品成分",
          headimg: "http://121.40.124.132:3000/images/search/touxiang.png",
          user: "晨安睡不醒",
        },
      ],
    });
    return {
      data,
    };
  },
};
</script>

<style lang="less" scoped>
.p {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 10px 16px;
}
.chat {
  margin-left: 16px;
  line-height: 34px;
  .chat1 {
    font-size: 14px;
    color: #78cccd;
    margin-right: 5px;
  }
  .chat2 {
    font-size: 14px;
    font-weight: 900;
    margin-right: 30px;
  }
  .chat3 {
    font-size: 1px;
    color: #acacac;
  }
}
.discus {
  .tabtop {
    padding: 0 16px;
    .tabtop1 {
      font-size: 14px;
      font-weight: 900;
      color: #68dcdc;
      line-height: 23px;
    }
    .tabtop2 {
      font-size: 12px;
      color: #bdbdbd;
      line-height: 20px;
    }
  }
  .tabbot {
    padding: 5px 16px 10px;
    .tabbotl {
      display: inline-block;
      height: 20px;
      img {
        width: 15px;
        height: 15px;
        float: left;
      }
      span {
        line-height: 15px;
        font-size: 12px;
        font-weight: 900;
        color: #6d6d6d;
        vertical-align: top;
      }
    }
    .tabbotr {
      float: right;
      height: 20px;
      .icon {
        font-size: 14px;
        float: left;
        color: #b9b9b9;
      }
      span {
        font-size: 1px;
        float: left;
        margin-left: 5px;
        color: #b9b9b9;
      }
      button {
        margin: 0 10px;
        border: none;
        background: #fff;
      }
    }
  }
}
</style>
